﻿<phone:PhoneApplicationPage 
    x:Class="OnlineVideos.CricketDetail"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
      xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"

    xmlns:vis="clr-namespace:OnlineVideos"
              xmlns:LART="clr-namespace:OnlineVideos"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False" Loaded="PhoneApplicationPage_Loaded">
    
    <phone:PhoneApplicationPage.Resources>
        <vis:VisibilityConverter x:Key="visb">
            
        </vis:VisibilityConverter>


            <Style x:Key="ListBoxItemStyle1" TargetType="ListBoxItem">
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="BorderBrush" Value="Transparent"/>
            <Setter Property="Padding" Value="0"/>
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
            <Setter Property="VerticalContentAlignment" Value="Top"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ListBoxItem">
                        <Border x:Name="LayoutRoot" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="MouseOver"/>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="LayoutRoot">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TransparentBrush}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <DoubleAnimation Duration="0" To=".5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ContentContainer"/>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="SelectionStates">
                                    <VisualStateGroup.Transitions>
                                        <VisualTransition From="Selected" GeneratedDuration="0" To="Unselected">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="LayoutRoot">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TransparentBrush}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualTransition>
                                        <VisualTransition From="Unselected" GeneratedDuration="0" To="Selected">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="LayoutRoot">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneAccentBrush}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualTransition>
                                        <VisualTransition From="Selected" GeneratedDuration="0" To="SelectedUnfocused">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="LayoutRoot">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneAccentBrush}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualTransition>
                                        <VisualTransition From="Unselected" GeneratedDuration="0" To="SelectedUnfocused">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="LayoutRoot">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneAccentBrush}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualTransition>
                                        <VisualTransition From="SelectedUnfocused" GeneratedDuration="0" To="Unselected">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="LayoutRoot">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TransparentBrush}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualTransition>
                                        <VisualTransition From="SelectedUnfocused" GeneratedDuration="0" To="Selected">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="LayoutRoot">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneAccentBrush}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualTransition>
                                    </VisualStateGroup.Transitions>
                                    <VisualState x:Name="Unselected"/>
                                    <VisualState x:Name="Selected"/>
                                    <VisualState x:Name="SelectedUnfocused"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualStateGroup.Transitions>
                                        <VisualTransition From="Focused" GeneratedDuration="0" To="Unfocused"/>
                                        <VisualTransition From="Unfocused" GeneratedDuration="0" To="Focused"/>
                                    </VisualStateGroup.Transitions>
                                    <VisualState x:Name="Unfocused"/>
                                    <VisualState x:Name="Focused"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <ContentControl x:Name="ContentContainer" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{StaticResource PhoneAccentBrush}" 
										/>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

    </phone:PhoneApplicationPage.Resources>
<Grid x:Name="mainGrid" Background="{StaticResource bipivot}">
        <Grid.RowDefinitions>
            <RowDefinition Height="{Binding Path=SelectedIndex,ElementName=pvtMainDetails,Converter={StaticResource visb}}" />
   <RowDefinition Height="80" />
           
           
        </Grid.RowDefinitions>
       
            <!--LayoutRoot is the root grid where all page content is placed-->
            <Grid x:Name="LayoutRoot" Grid.Row="0" >
                <!--Pivot Control-->
                <phone:Pivot x:Name="pvtMainDetails"  SelectionChanged="pvtMainDetails_SelectionChanged">
                  <phone:Pivot.Title>
                        <StackPanel Orientation="Horizontal" Margin="0,0,0,0">
                            <Image Style="{StaticResource DetailPagePivotTitleImage}" x:Name="imgTitle" MouseLeftButtonDown="imgTitle_MouseLeftButtonDown"/>
                            <TextBlock x:Name="tblkVideosTitle" TextWrapping="NoWrap" Style="{StaticResource DetailPagePivotTitle}" />
                        </StackPanel>
                    </phone:Pivot.Title>
                  <phone:Pivot.Foreground>
                        white
                    </phone:Pivot.Foreground>
                    <!--Pivot item one-->
                  <phone:PivotItem x:Name="pvtitmCriketSumarry" Header="summary">
                        <Grid x:Name="SummaryGrid">
                            <LART:CricketSummary x:Name="summary"></LART:CricketSummary>
                        </Grid>
                    </phone:PivotItem>

                    <!--Pivot item two-->
                  <phone:PivotItem x:Name="pvtitmvideos" Header="videos">
                        <Grid x:Name="VideosGrid">

                            <LART:ShowVideos x:Name="videos" ></LART:ShowVideos>
                        </Grid>
                    </phone:PivotItem>
                  <phone:PivotItem x:Name="pvtitmcast1" >
                        <Grid x:Name="CastGrid">

                            <LART:ShowCast x:Name="Cast" ></LART:ShowCast>
                        </Grid>
                    </phone:PivotItem>
                  <phone:PivotItem x:Name="pvtitmcast2" >
                        <Grid x:Name="CastGrid1">

                            <LART:ShowCast x:Name="Cast1" ></LART:ShowCast>
                        </Grid>
                    </phone:PivotItem>
                  <phone:PivotItem  Margin="0,-30,0,0" x:Name="gamepivot" Header="game" Foreground="White" >
                        <Grid x:Name="GameGrid">
                            <StackPanel Name="gamestk" >
                                <LART:MemoryGame x:Name="game" />
                            </StackPanel>
                        </Grid>
                    </phone:PivotItem>
                </phone:Pivot>
                <toolkit:PerformanceProgressBar
            VerticalAlignment="Top"
            x:Name="performanceProgressBar"/>
            </Grid>

        <StackPanel Name="adstaCast" Grid.Row="1"   Orientation="Vertical">
        </StackPanel>
       
    </Grid>

    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton x:Name="appbar_button1" IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton x:Name="appbar_button2" IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem x:Name="menuItem1" Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem x:Name="menuItem2" Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->
    
</phone:PhoneApplicationPage>